<template>
  <el-form :inline="true" :model="formInline" label-position="left" class="demo-form-inline">
    <el-form-item label="设备名称" label-width="120px">
      <el-input v-model="formInline.deviceName"  readonly/>
    </el-form-item>
    <el-form-item label="设备编码"  label-width="120px">
      <el-input v-model="formInline.deviceCode"   readonly/>
    </el-form-item>
    <el-form-item label="作业任务名称" label-width="120px">
      <el-input v-model="formInline.itemName" placeholder="请输入任务名称" clearable />
    </el-form-item>
    <el-form-item label="作业任务编码" label-width="120px">
      <el-input v-model="formInline.itemCode" placeholder="请输入任务编码" clearable />
    </el-form-item>
  </el-form>
</template>

<script setup lang="ts">
import {ref} from "vue"
// const lable = defineModel('lable')
const loglabel = (node)=>{
  formInline.deviceName = node.label
  formInline.deviceCode = node.code
}
const formInline = reactive({
  deviceName: '',
  deviceCode: '',
  itemName: '',
  itemCode: '',
})

const onSubmit = () => {
  console.log('submit!')
}
defineExpose({
  loglabel
})
</script>

<style lang="less" scoped>
 .container {
 }
.demo-form-inline{
  // border: 1px solid rgb(140, 140, 140);
  padding: 8px;
}
</style>
